package com.yonyou.pmclouds.workflow.service.rmiitf;

import com.yonyou.pmclouds.basecom.entity.SuperVO;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.workflow.entity.*;
import yonyou.bpm.rest.request.RestVariable;

import java.util.List;

public interface IWorkFlowService {

    Object approveInFlow(ApproveInfoParam approveInfoParam) throws BusinessException;

    boolean approveByCallBack(String pkBill, String definitionKey) throws BusinessException;

    SuperVO approveDirectly(String pkBill, String billType, byte billStatus) throws BusinessException;

    boolean reject(ApproveInfoParam approveInfoParam) throws BusinessException;

    SuperVO getBuziVOForWorkFlow(String pkBill, String billType) throws BusinessException;

    List<ProcessRunTimeVO> getApprovalRecord(String userId, String tenantId, String businessKey, String billType)
            throws BusinessException;

    boolean checkApprovePerm(String pkBill, String pkUser) throws BusinessException;

    ProcessDefinitionVO getDefinitionByKey(String definitionKey) throws BusinessException;

    List<RestVariable> getVariableList(SuperVO businessVO) throws BusinessException;

    SuperVO deleteBill(String pkBill, String billType) throws BusinessException;

    /**
     * 审批流启动之后业务扩展
     */
    void afterFlowStarted(StartFlowArgsVO startFlowArgsVO) throws BusinessException;

    void updateBillStatus(String billType, SuperVO businessVO, byte billStatus) throws BusinessException;
}